Skip to content

feat: upgrade from Java 17 to Java 21#168

Open
devin-ai-integration[bot] wants to merge 1 commit intoDevOpsfrom
devin/1777273416-java21-upgrade
Open

feat: upgrade from Java 17 to Java 21#168
devin-ai-integration[bot] wants to merge 1 commit intoDevOpsfrom
devin/1777273416-java21-upgrade

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Upgrades the project from Java 17 to Java 21 across all configuration files.

Changes

pom.xml

  • java.version: 1721
  • maven-compiler-plugin: 3.8.03.13.0, source/target 1.821
  • Replaced deprecated mysql:mysql-connector-java:8.0.33 with com.mysql:mysql-connector-j:8.3.0

Dockerfile

  • Stage 1: maven:3.8.3-openjdk-17maven:3.9.9-eclipse-temurin-21-alpine (openjdk images are deprecated and don't publish Java 21 tags)
  • Stage 2: openjdk:17-alpineeclipse-temurin:21-jre-alpine

README.md

  • Jenkins install instructions: openjdk-17-jreopenjdk-21-jre

Verification

  • mvn clean install -DskipTests=true — BUILD SUCCESS
  • docker build -t bankapp:java21-test . — built successfully with the new multi-stage images

Review & Testing Checklist for Human

  • Verify the application starts correctly with Java 21 (java -jar target/bankapp-0.0.1-SNAPSHOT.jar)
  • Confirm the Docker image runs properly: docker run -p 8080:8080 bankapp:java21-test
  • Check that the MySQL connector resolves correctly in the runtime classpath

Notes

  • Eclipse Temurin is the recommended replacement for the deprecated OpenJDK Docker images.
  • The mysql-connector-java artifact was relocated to com.mysql:mysql-connector-j by Oracle.

Link to Devin session: https://app.devin.ai/sessions/4e092bfcca7c4cccb30ef0d3247015ab
Requested by: @joao-cognition

- Update java.version property from 17 to 21
- Upgrade maven-compiler-plugin from 3.8.0 to 3.13.0 with source/target 21
- Replace deprecated mysql-connector-java with mysql-connector-j 8.3.0
- Switch Dockerfile to maven:3.9.9-eclipse-temurin-21-alpine and eclipse-temurin:21-jre-alpine
- Update README Jenkins install instructions to openjdk-21-jre

Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants